<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <ui:composition> 

        <h:form>  

              <p:growl id="messages" ></p:growl>  

              <p:toolbar style="min-width: 1200px">  
                <p:toolbarGroup align="left" styleClass="grupoLogo">  
                    <h:outputText id="logo" class="logo" value="RetailShop" />
                    <p:spacer width="60" height="10" />
                    <h:outputText value="Tu web de compras online..."/>

                </p:toolbarGroup>  


                <p:toolbarGroup align="right">  
                   
                    <p:commandButton ajax="false" value="Inicio" title="Inicio" icon="ui-icon-home" action="#{controllerBean.home()}" style="margin-top: 5px"/> 
                    <p:commandButton ajax="false" value="Buscador" title="Save" icon="ui-icon-search" action="#{controllerBean.search()}"/>  
                   
                    <c:if test="#{controllerBean.userLoged()}">
                        <p:commandButton  ajax="false" value="Carrito" icon="ui-icon-cart" action="#{purchaseManagedBean.viewCart()}"/>  
                    
                    <p:commandButton  ajax="false" value="Mi cuenta" icon="ui-icon-person" action="#{controllerBean.myAccount}"/>  
                    <c:if test="#{controllerBean.adminLoged()}">
                        <p:commandButton  ajax="false" value="Backoffice" icon="ui-icon-suitcase" action="#{controllerBean.backoffice}" /> 
                    </c:if>
                    </c:if>
                    <p:commandButton  ajax="false" value="Salir" icon="ui-icon-power" action="#{controllerBean.logout}" />  
                </p:toolbarGroup>  

            </p:toolbar>  
        </h:form> 
    </ui:composition>
</html>
